home *** CD-ROM | disk | FTP | other *** search
/ Turnbull China Bikeride / Turnbull China Bikeride - Disc 2.iso / STUTTGART / UTIL / MEMORY / VIRTUASRC / !Virtual / h / pager < prev    next >
Text File  |  1993-09-06  |  1KB  |  47 lines

  1. /*
  2.  * pager.h
  3.  * Part of the !Virtual distribution
  4.  * (c) bdb/nas/fo, 1992-3
  5.  */
  6.  
  7. typedef struct range { int start,end; } RANGE;
  8.  
  9. /* All of these must be called in normal, svc mode */
  10.  
  11. /* initialise */
  12. void Initourmem(WKSP *w);
  13. /* reread which pages we have after Wimp may have changed them */
  14. void FindPages(WKSP *w);
  15. /* Call wimp to set slot size */
  16. void SetRealMem(WKSP *w, int size);
  17. /* Set up memmap to match slot from wimp */
  18. void SetWimpMemMap(WKSP *w);
  19. /* Resize pagefile for virtual slot, return size actually got */
  20. int SetVirtualSlot(WKSP *w, int size);
  21. /* terminate */
  22. void Finishourmem(WKSP *w);
  23.  
  24. /* switch to/from virtual mem map */
  25. void virtualmem(WKSP *w);
  26. void normalmem(WKSP *w);
  27.  
  28. /* All these return 0 indicating failed. The first 3 work on any memory area. */
  29.  
  30. /* Find physical image of r or some initial section of it, and return that *
  31.  * Locate can return pagefile offset|(1<<31),
  32.  * while Physical will page it it in */
  33. RANGE Locate(WKSP *w, int start, int end);
  34. RANGE Physical(WKSP *w, int start, int end);
  35.  
  36. /* Read and write blocks of virtual memory */
  37. int ToMem(WKSP *w, void *src, int dest, int size);
  38. int FromMem(WKSP *w, int src, void *dest, int size);
  39.  
  40. /* Ensure mapped in - call in virtual, svc mode */
  41. int ReadRange(WKSP *w, int start, int end);
  42. int WriteRange(WKSP *w, int start, int end);
  43. int ReadPtr(WKSP *w, int start);
  44. int WritePtr(WKSP *w, int start);
  45.  
  46. void FixMemoryPages(WKSP *w);
  47.